package com.carleasoft.mps.cms.business.article.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.carleasoft.mps.cms.business.article.bean.entity.AuthorityArticleEntity;
import com.carleasoft.mps.cms.business.article.bean.po.ArticlePagePo;
import com.carleasoft.mps.cms.business.article.bean.po.ArticlePo;
import com.carleasoft.mps.cms.business.article.bean.po.ArticleStatusPo;
import com.carleasoft.mps.cms.business.article.bean.po.CollectorPo;
import com.carleasoft.mps.cms.business.article.bean.vo.*;

import java.util.List;

public interface ArticleService {
    /**
     * 分页查询内容采编
     * @param page,ArticlePageVo
     * @return List<ArticlePageVo>
     */
    Page<ArticlePageVo> pageQuery(Page page, ArticlePagePo articlePagePo);

    /**
     * 文章新增
     */
    int insertArticle(ArticlePo articlePo  );

    /**
     * 文章修改
     */
    int updateArticle(ArticlePo articlePo  );

    /**
     * 详情查询
     */
    ArticleVo findByIdArticle(String articleCode, String eip);

    /**
     * 状态修改
     */
    int updateArticleStatus(ArticleStatusPo articleStatusPo);

    /**
     * 通过栏目获得文章所有信息
     */
    Page<SlideshowEIPVo> EIPPageQuery(Page<ArticlePo> page, ArticlePo categoryCode);

    int toTop(AuthorityArticleEntity authorityArticleEntity);

    int updateWeight(AuthorityArticleEntity authorityArticleEntity);

    @Deprecated
    List<SlideshowEIPVo> homePage(String categoryCode);

    @Deprecated
    List<EIPDetailVo> slideshowPage(String categoryCode);

    Page topPageQuery(Page page, ArticlePo articlePo);

    EipIndexOf eipUpAndDown(Page page, ArticlePo articlePo);

    int count(String categoryCode);

    boolean collector(CollectorPo collectorPo);
}
